|
 |
/*
If you render this Povray Scene File you'll get a picture of the
British Flag (the Union Jack). The texture is 100% procedural,
i.e. you can render it in every resolution you like without
getting any stairs as would be the case when using image maps.
On the other hand, you could use this scene to generate an
image map to map it onto some other object.
Why did I create such a scene file? I needed a picture of a
British Flag in very high resolution and with absolutely
correct geometry. Additionally, I wanted to experiment
with layered pigments.
See http://jdawiseman.com/papers/union-jack/union-jack.html for
details on geometry and color. If you need to ensure absolutely
correct colors, make sure you know the basics of Gamma values
and set Povray's Assumed_Gamma accordingly.
The flag's proportions are 2:1 so you should use povray parameters
like "+w640 +h320 +a0.1 +j0 +r5"
March 2000, Peter Santo
san### [at] exaweb de
*/
#declare UK_finish = finish {
ambient 1.0
diffuse 0.0
}
#declare UK_white = color rgb<1, 1, 1>;
#declare UK_red = color rgb<0.8, 0, 0.2>;
#declare UK_blue = color rgb<0, 0.2, 0.4>;
#declare UK_diagonal = pigment {
gradient y
color_map {
[ 0/30 color UK_blue ]
[12/30 color UK_blue ]
[12/30 color UK_white]
[15/30 color UK_white]
[15/30 color UK_red ]
[17/30 color UK_red ]
[17/30 color UK_white]
[18/30 color UK_white]
[18/30 color UK_blue ]
[30/30 color UK_blue ]
}
translate y * 0.5
scale 1 / sqrt(2)
}
#declare UK_d1 = pigment {
UK_diagonal
rotate z * -45
translate <0.5, 0.5, 0>
}
#declare UK_d2 = pigment {
UK_diagonal
rotate z * (180 + 45)
}
#declare UK_d3 = pigment {
UK_diagonal
rotate z * 45
}
#declare UK_d4 = pigment {
UK_diagonal
rotate z * (180 - 45)
translate <0.5, 0.5, 0>
}
#declare UK_white_x = pigment {
gradient x
pigment_map {
[ 0/20 UK_white]
[ 9/20 UK_white]
[ 9/20 UK_red]
[11/20 UK_red]
[11/20 UK_white]
[20/20 UK_white]
}
}
#declare UK_bottom = pigment {
gradient x
pigment_map {
[ 0/60 UK_d3]
[25/60 UK_d3]
[25/60 UK_white]
[27/60 UK_white]
[27/60 UK_red]
[33/60 UK_red]
[33/60 UK_white]
[35/60 UK_white]
[35/60 UK_d4]
[60/60 UK_d4]
}
}
#declare UK_top = pigment {
gradient x
pigment_map {
[ 0/60 UK_d1]
[25/60 UK_d1]
[25/60 UK_white]
[27/60 UK_white]
[27/60 UK_red]
[33/60 UK_red]
[33/60 UK_white]
[35/60 UK_white]
[35/60 UK_d2]
[60/60 UK_d2]
}
}
// Completely nested texture
// From Top to Bottom
#declare UK_texture = texture {
pigment {
gradient y
pigment_map {
[ 0/30 UK_bottom]
[10/30 UK_bottom]
[10/30 UK_white_x]
[12/30 UK_white_x]
[12/30 UK_red]
[18/30 UK_red]
[18/30 UK_white_x]
[20/30 UK_white_x]
[20/30 UK_top]
[30/30 UK_top]
}
}
finish { UK_finish }
}
#declare perspective_camera = camera {
location <0, 0, -2>
direction 2*z
right 1*x
look_at <0, 0, 0>
translate <0.5, 0.5, 0>
}
#declare orthographic_camera = camera {
orthographic
location <0, 0, -2>
direction 2 * z
right 1 * x
up 1 * y
look_at <0, 0, 0>
translate <0.5, 0.5, 0>
}
camera { orthographic_camera }
plane {
z, 0
texture { UK_texture }
}
Post a reply to this message
|
 |